<template>
<!-- 这是 数组 增加 框 有限制最大值 -->
    <div class="mui-numbox" data-numbox-min="1">
    <button class="mui-btn mui-btn-numbox-minus" type="button">-</button>
    <input id="test" class="mui-input-numbox" type="number" :value="goodscount" @change="changenum" ref="number" readonly>
    <button class="mui-btn mui-btn-numbox-plus" type="button">+</button>
  </div>
</template>

<script>
import mui from "./../lib/mui/js/mui.min.js"
  export default {
    mounted() {
        mui('.mui-numbox').numbox()
    },
    methods: {
      changenum(){
        //   console.log(this.$refs.number.value)
          this.$store.commit("changegoodsnum",{id:this.gid,count:this.$refs.number.value})
      }
    },
    props:["goodscount","gid"]
  }
</script>

<style lang="less" scoped>
</style>